﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace VueShopApi.Entities 
{
	/// <summary>
	/// 管理员表
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "sp_manager", DisableSyncStructure = true)]
	public partial class SpManager 
	{
		/// <summary>
		/// 主键id
		/// </summary>
		[JsonProperty("mg_id"), Column(Name = "mg_id", IsPrimary = true, IsIdentity = true)]
		public int MgId { get; set; }

		[JsonProperty("mg_email"), Column(Name = "mg_email", StringLength = 64)]
		public string MgEmail { get; set; }

		[JsonProperty("mg_mobile"), Column(Name = "mg_mobile", StringLength = 32)]
		public string MgMobile { get; set; }

		/// <summary>
		/// 名称
		/// </summary>
		[JsonProperty("mg_name"), Column(Name = "mg_name", StringLength = 32, IsNullable = false)]
		public string MgName { get; set; }

		/// <summary>
		/// 密码
		/// </summary>
		[JsonProperty("mg_pwd"), Column(Name = "mg_pwd", DbType = "char(64)", IsNullable = false)]
		public string MgPwd { get; set; }

		/// <summary>
		/// 1：表示启用 0:表示禁用
		/// </summary>
		[JsonProperty("mg_state"), Column(Name = "mg_state", DbType = "tinyint(2)")]
		public sbyte? MgState { get; set; } = 1;

		/// <summary>
		/// 注册时间
		/// </summary>
		[JsonProperty("mg_time"), Column(Name = "mg_time")]
		public int MgTime { get; set; }

		/// <summary>
		/// 角色id
		/// </summary>
		[JsonProperty("role_id"), Column(Name = "role_id", DbType = "tinyint(11)")]
		public int RoleId { get; set; } = 0;

	}

}
